package com.gali.lovefinder.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gali.lovefinder.common.BaseResponse;
import com.gali.lovefinder.common.ResultUtils;
import com.gali.lovefinder.model.entity.Post;
import com.gali.lovefinder.service.PostService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/post")
public class PostController {
    @Resource
    private PostService postService;

    @GetMapping("/list")
    public BaseResponse<List<Post>> getPostList() {
        //todo 综合查询 帖子详细信息，用户信息，业务层处理
        return ResultUtils.success(postService.getPostList());
    }
}
